import React from 'react';
import type { PaginationProps as PaginationParams } from 'antd'
import BasePagination from './components/BasePagination';
import ModalPagination from './components/ModalPagination';

interface PaginationProps {
  size?: 'small' | 'default';
  options?: number[];
  total?: number;
  current?: number;
  pageSize?: number;
  onChange?: Function;
  style?: object;
  className?: string;
  onPageChange?: (pageInfo: { current: number; pageSize: number }) => void;
  refreshData?: () => void;
  pagination?: PaginationParams;
  pageRefresh?: boolean;
}
const Pagination = (props: PaginationProps) => {
  const { size = 'default', ...otherProps } = props;
  return (
    size === 'default' ? <BasePagination {...otherProps} /> : <ModalPagination {...otherProps} />
  );
};

export default Pagination;
